<template>
	<view class="container">
		<uni-list>
		    <uni-list-item title="牧耘郎平台用户注册协议" :hide-hover="false" @tap="doProtocol('https://download.dfkjt.com/userRegistrationAgreement.txt', '用户协议')"></uni-list-item>
			<uni-list-item title="牧耘郎会员注册协议" :hide-hover="false" @tap="doProtocol('https://download.dfkjt.com/memberRegistrationAgreement.txt', '牧耘郎会员服务协议')"></uni-list-item>
			<uni-list-item title="用户隐私政策" :hide-hover="false" @tap="doProtocol('https://download.dfkjt.com/re_privacyPolicy.txt', '用户隐私保护政策')"></uni-list-item>
			<uni-list-item title="产品代理合同" :hide-hover="false" @tap="doProtocol('https://download.dfkjt.com/agentCooperationAgreement.txt', '牧耘郎代理商合作协议')"></uni-list-item>
		</uni-list>	
	</view>
</template>

<script>
	
	import uniList from "@/components/uni-list/uni-list.vue"
	import uniListItem from "@/components/uni-list-item/uni-list-item.vue"
	
	export default {
		data() {
			return {

			};
		},
		components:{
			uniList,
			uniListItem
		},
		methods: {
			doProtocol(url,title) {
				if(!url){
					uni.showToast({
						title: '还未上传相关协议',
						icon: "none"
					});
					return;
				}
				uni.navigateTo({
					url:`/pages/public/protocol?url=${url}&title=${title}`
				})
				
			}
		}
	}
</script>

<style lang='scss'>
	page {
		background: $page-color-base;
	}

	.container {
		border-top: .5upx solid #f3f5f7;
		.uni-list{
			border-radius: 20upx;
			overflow: hidden;
			&:first-child{
				border-radius: 0 0 20upx 20upx;
			}
		}
	}
</style>
